<?php
	header('content-type:text/html;charset=utf-8');
	require 'mysqlpublic.php';
	$phone=$_POST['phone'];
	$pw=md5($_POST['pw']);
	if($phone){
		$sql="select * from userinfo where userphone='$phone'";
	}
	$result=mysql_query($sql);
	$sql_arr = mysql_fetch_assoc($result);
	if($sql_arr['uid']){
		if($pw==$sql_arr['password']){
			echo 2;
		}else{
			echo 1;
		}
	}else{
		echo 0;
	}
	mysql_close($conn);
?>